package com.example.warehouse.bus.dao.persist.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.example.warehouse.bus.pojo.entity.BusOutport;
import com.example.warehouse.bus.pojo.param.BusOutportUpdateParam;
import com.example.warehouse.bus.pojo.vo.BusOutportListItemVO;
import com.example.warehouse.common.pojo.vo.PageData;
import com.example.warehouse.common.security.CurrentPrincipal;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 处理商品退货的mapper接口
 *
 * @author XXH
 */
@Repository
public interface BusOutportMapper extends BaseMapper<BusOutport> {

    /**
     * 增加商品退货数据--增
     *
     * @param busOutport 商品退货实体类
     * @return 插入数据条数
     */
    int insert(@Param("o") BusOutport busOutport);

    /**
     * 根据ID删除数据(逻辑删除)
     *
     * @param id
     * @param currentPrincipal
     * @return 受影响条数
     */
    int deleteById(Long id, CurrentPrincipal currentPrincipal);


    /**
     * 根据id修改退货数据
     *
     * @param id
     * @param busOutportUpdateParam
     * @return 更改条目数
     */
    int updateById(Long id, @Param("u") BusOutportUpdateParam busOutportUpdateParam);

    /**
     * 查询退货数据列表
     * @return 列表集合
     */
    List<BusOutportListItemVO> list() ;
}
